/* =========================================
   ROOT VARIABLES & RESET
========================================= */
:root {
  --bg: #ffffff;
  --text: #111827;
  --primary: #009970;
  --card: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.08);
  --para: #64748b;
}

body.dark {
  --bg: #041226;
  --text: #ffffff;
  --card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --para: #94a3b8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Arial, sans-serif;
  transition: 0.3s;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--nf-bg);
  color: var(--nf-text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.75;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--nf-green-dark);
  text-decoration: none;
  transition: color 0.25s ease;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   ARTICLE PAGE
========================= */
.article-page {
  padding: 48px 20px 80px;
  background: var(--nf-bg);
  transition: background-color 0.3s ease;
}

.article-wrap {
  width: min(100%, 980px);
  margin: 0 auto;
}

/* =========================
   HERO
========================= */
.article-hero {
  background: var(--nf-card);
  border: 1px solid var(--nf-border);
  border-radius: 32px;
  padding: 56px 56px 44px;
  box-shadow: var(--nf-shadow);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--nf-green-soft);
  color: var(--nf-green);
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 28px;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.article-hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2.2rem, 5vw, 4.25rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--nf-text);
}

.article-intro-text {
  max-width: 760px;
  margin: 26px 0 0;
  color: var(--nf-muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.7;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 30px;
  color: var(--nf-meta);
  font-weight: 700;
}

/* =========================
   FEATURED IMAGE
========================= */
.article-featured-image {
  margin: 34px 0 0;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--nf-border);
  background: var(--nf-soft);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.article-featured-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* =========================
   ARTICLE CONTENT
========================= */
.article-content {
  width: min(100%, 780px);
  margin: 44px auto 0;
  font-size: 1.04rem;
}

.article-content p {
  margin: 0 0 20px;
  color: var(--nf-body-text);
}

.article-content h2 {
  margin: 48px 0 16px;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--nf-text);
}

.article-content h3 {
  margin: 30px 0 10px;
  font-size: 1.25rem;
  line-height: 1.35;
  color: var(--nf-text);
}

.article-content ol,
.article-content ul {
  margin: 0 0 24px 22px;
  padding-left: 18px;
}

.article-content li {
  margin-bottom: 10px;
  color: var(--nf-body-text);
}

.article-content strong {
  color: var(--nf-text);
}

.article-content hr {
  border: 0;
  border-top: 1px solid var(--nf-border);
  margin: 36px 0;
}

/* =========================
   ARTICLE LINKS
========================= */
.article-content a {
  color: var(--nf-green-dark);
  font-weight: 600;
}

.article-content a:hover {
  color: var(--nf-green);
}

/* =========================
   CTA BOX
========================= */
.article-cta {
  margin: 34px 0 44px;
  padding: 28px;
  background: linear-gradient(
    135deg,
    var(--nf-cta-bg-1),
    var(--nf-cta-bg-2)
  );
  border: 1px solid var(--nf-cta-border);
  border-radius: 24px;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

.article-cta h2 {
  margin: 4px 0 10px;
  font-size: 1.65rem;
  color: var(--nf-text);
}

.article-cta p {
  color: var(--nf-body-text);
}

.cta-kicker {
  color: var(--nf-green);
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  padding: 13px 18px;
  border-radius: 12px;
  background: var(--nf-green);
  color: #ffffff;
  font-weight: 800;
  transition:
    background-color 0.25s ease,
    transform 0.2s ease;
}

.cta-button:hover {
  background: var(--nf-green-dark);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* =========================
   INFO BOX / MEDICAL NOTE
========================= */
.info-box,
.medical-note {
  margin: 28px 0;
  padding: 24px;
  border-radius: 20px;
  background: var(--nf-soft);
  border: 1px solid var(--nf-border);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.info-box p:last-child,
.medical-note p:last-child {
  margin-bottom: 0;
}

/* =========================
   TABLE
========================= */
.calorie-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
  border: 1px solid var(--nf-border);
  border-radius: 18px;
  background: var(--nf-card);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.calorie-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

.calorie-table th,
.calorie-table td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid var(--nf-border);
}

.calorie-table th {
  background: var(--nf-soft);
  color: var(--nf-text);
}

.calorie-table td {
  color: var(--nf-body-text);
  background: var(--nf-card);
}

.calorie-table tr:last-child td {
  border-bottom: 0;
}

/* =========================
   SOURCE NOTE
========================= */
.source-note {
  font-size: 0.94rem;
  color: var(--nf-muted) !important;
}

/* =========================
   FAQ
========================= */
.faq-section {
  margin-top: 46px;
}

.faq-item {
  border: 1px solid var(--nf-border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 16px;
  background: var(--nf-faq-bg);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

.faq-item h3 {
  margin-top: 0;
  color: var(--nf-text);
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* =========================
   REFERENCES
========================= */
.references-section ol {
  padding-left: 24px;
}

.references-section li {
  margin-bottom: 14px;
  color: var(--nf-body-text);
}

.references-section a {
  color: var(--nf-green);
  font-weight: 600;
}

/* =========================
   BOTTOM CTA
========================= */
.article-bottom-cta {
  margin-top: 48px;
  padding: 24px 26px;
  border-radius: 20px;
  background: var(--nf-bottom-bg);
  color: var(--nf-bottom-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.article-bottom-cta span {
  font-weight: 700;
  color: var(--nf-bottom-text);
}

.article-bottom-cta a {
  color: var(--nf-bottom-link);
  font-weight: 800;
}

.article-bottom-cta a:hover {
  color: var(--nf-bottom-link);
}

/* =========================
   DARK MODE EXTRA POLISH
========================= */
body.dark .article-featured-image img {
  opacity: 0.95;
}

body.dark .cta-button {
  color: #ffffff;
}

body.dark .article-content a {
  color: #4adea5;
}

body.dark .article-content a:hover {
  color: #6ee7b7;
}

body.dark .calorie-table-wrap {
  box-shadow: none;
}

body.dark .article-hero {
  background: var(--nf-card);
}

body.dark .faq-item {
  background: var(--nf-faq-bg);
}

body.dark .info-box,
body.dark .medical-note {
  background: var(--nf-soft);
}

body.dark .calorie-table td {
  background: var(--nf-card);
}

/* =========================
   TABLET
========================= */
@media (max-width: 768px) {
  .article-page {
    padding: 28px 14px 60px;
  }

  .article-hero {
    padding: 34px 24px 30px;
    border-radius: 24px;
  }

  .article-badge {
    margin-bottom: 20px;
  }

  .article-meta {
    gap: 14px;
  }

  .article-content {
    margin-top: 32px;
    font-size: 1rem;
  }

  .article-content h2 {
    margin-top: 38px;
  }

  .article-cta,
  .info-box,
  .medical-note {
    padding: 20px;
  }

  .article-bottom-cta {
    padding: 22px;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 480px) {
  .article-page {
    padding-left: 10px;
    padding-right: 10px;
  }

  .article-hero {
    padding: 28px 18px 24px;
    border-radius: 20px;
  }

  .article-hero h1 {
    font-size: 2rem;
  }

  .article-intro-text {
    font-size: 1rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .article-featured-image {
    border-radius: 20px;
  }

  .article-content h2 {
    font-size: 1.55rem;
  }

  .article-content h3 {
    font-size: 1.15rem;
  }

  .article-bottom-cta {
    align-items: flex-start;
  }

  .cta-button {
    width: 100%;
    text-align: center;
  }
}